1. Field of the Invention
The invention generally relates to a method for video processing, in particular, to a method for encoding and decoding video by oblong intra prediction.
2. Description of Related Art
The development of digital multimedia technology has provided high quality video streaming. Given limited storage capacity and network bandwidth for image data transmission and reception, video compression technology thus plays an important and indispensable role. High Efficiency Video Coding (HEVC/H.265) is one of the existing video compression standards and was jointly developed by Video Coding Expert Group (VCEG) and Moving Picture Experts Group (MPEG). Compared with Advanced Video Coding (AVC/H.264), HEVC/H.265 not only provides higher compression ratio and video quality, but also supports ultra high definition (UHD) image resolution.
The H.265/HEVC video encoding mechanism is to first partition an encoding frame into a plurality of equally-sized square coding tree units (CTU), where the size of each of the coding tree units may be 64×64, 32×32, or 16×16 (in pixel). Next, each of the coding tree units may be partitioned into one or more coding units (CU) in a quadtree representation, where each of the coding units is a square having a same size as or a smaller size than one coding tree unit. The size of each of the coding units may be 64×64, 32×32, 16×16, or 8×8, and may be represented as 2N×2N. Each pixel within a same coding unit is encoded by employing a same encoding mode, and each of the coding units is further partitioned into one, two, or four prediction units (PU) according to the corresponding encoding mode. The partition technique involves an intra prediction mode, an inter prediction mode, and an intra block copy mode, where each pixel within the same prediction unit is encoded by employing a same prediction mode.
The prediction approach used in the intra prediction mode is to reconstruct neighboring image samples for a next prediction, and it supports a 2N×2N and an N×N partition. The prediction approach used in the inter prediction mode uses motion compensation for a next prediction, and it supports a symmetric partition mode (e.g. 2N×2N, N×2N, 2N×N, and N×N) as well as an asymmetric partition mode (e.g. 2N×nU, 2N×nD, nL×2N, and nR×2N), where nU, nD, nL, and nR respectively belong to shorter sides of different blocks after the partition. The intra block copy mode is an exception of the intra prediction mode, where a neighboring block is copied to sub-blocks in a current coding unit to reduce data transmission. Such mode only supports a 2N×2N partition.
A matching reference block for each of the prediction units in a coding unit would be searched from a reference frame, and a residual between each of the prediction units and its reference block would be calculated for residual encoding. In terms of the residual encoding, each of the coding units would be partitioned into one or more square transform units (TU) in quadtree representation. Cross component prediction (CCP), residual differential pulse coding modulation (RDPCM), discrete cosine transform (DCT), and quantization would be performed on each of the transform units, and the residual encoding is then completed. Lastly, each of the coding units would be reconstructed according to its encoding mode.
Even though the H.265/HEVC video compression standard provides high compression ratio, only a square prediction unit is allowed for intra prediction and intra block copy. It is not simple to search out a matching reference block and thereby adversely affect video encoding efficiency.